#include "Model3D.h"
#include "GraphicsManager.h"

Model3D::Model3D()
{
	nMeshes = 0;
	meshes = NULL;
};

Model3D::~Model3D()
{
	for (unsigned int i = 0; i < nMeshes; i++)
	{
		GraphicsManager *graphicsManager = GraphicsManager::GetGraphicsManager();
		graphicsManager->DeleteBuffer(meshes[i].vertices);
		graphicsManager->DeleteBuffer(meshes[i].normals);
		graphicsManager->DeleteBuffer(meshes[i].texCoords);
	}
	SAFE_DEL_ARRAY(meshes);
};
